package org.tddx.dubbo;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.tddx.activiti.dubbo.TestDubbo;

@Controller
@SpringBootApplication
@ImportResource(value={"classpath:consume.xml"})
public class TestDubboApp {
	
	@Autowired TestDubbo testDubbo;
	
	@RequestMapping("main")
	@ResponseBody
	public String sayhello(){
		System.out.println(testDubbo.sayHello());
		System.out.println(testDubbo.sayHello());
		System.out.println(testDubbo.sayHello());
		return testDubbo.sayHello();
	}
	
	public static void main(String[] args) throws Exception {
        SpringApplication.run(TestDubboApp.class, args);
    }
	
}
